/// Copyright (c) zhuzichu520
/// https://github.com/zhuzichu520/FluentUI
/// This file is licensed under MIT
#ifndef FILEWATCHER_H
#define FILEWATCHER_H

#include <QtQml/qqml.h>
#include <QFileSystemWatcher>
#include <QObject>
#include "stdafx.h"

class FileWatcher : public QObject {
  Q_OBJECT
  Q_PROPERTY_AUTO(QString, path);

 public:
  explicit FileWatcher(QObject* parent = nullptr);
  Q_SIGNAL void fileChanged();

 private:
  void clean();

 private:
  QFileSystemWatcher _watcher;
};

#endif  // FILEWATCHER_H
